package com.java;

import java.net.SocketOption;

public class ja {
    public static void main(String[] args) {
        int[] a = new int[5] ;
        Scanner sc =new Scanner(System.in);
            for (int i =0; i<a.leangth ;i++){
                System.out.println("情书润第"+(i+1)+"个元素");
                a[i] =sc.nextint();
            }
            System.out.println("数组的元素为：");
            for (int i=0;i<a.length; i++){
                System.out.println([i]+" ");
            }
            int sum=0;
            for (int i=0;i<a.lenfth;i++){
                sum += a[i];
            }
            System.out.println("总和为"+sum);
    }
}
